import { Model, FieldPrefix } from '~/power/decorators'
import { JcModel } from '~/power/models'

const userJson = {
  user_name: 'Hamm',
  user_age: 18,
  user_bio: '这个人很懒，一句话也没留下'
}

@Model('账号')
@FieldPrefix('user_')
export class User extends JcModel {
  name!: string
  age!: number
  bio!: string
}

export const user = User.fromJson(userJson)
console.log(user.name)

// // const fieldName = Account.getFieldName('username')
// export const fieldName = getFieldName(Account, 'username')
